﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Media.Animation;

namespace SmartMeterParamSetting.UI
{
    /// <summary>
    /// Waiting.xaml 的交互逻辑
    /// </summary>
    public partial class Waiting : Window
    {
        public Waiting()
        {
            InitializeComponent();

            DoubleAnimation da = new DoubleAnimation(0, 360, new Duration(TimeSpan.FromSeconds(5)));
            RotateTransform rt = new RotateTransform();
            Img_Waiting.RenderTransform = rt;
            Img_Waiting.RenderTransformOrigin = new Point(0.5, 0.5);
            da.RepeatBehavior = RepeatBehavior.Forever;
            rt.BeginAnimation(RotateTransform.AngleProperty, da);
        }

        public Waiting(string Description)
            : this()
        {
            Txt_Descript.Text = Description;
        }
        /// <summary>
        /// 设置描述
        /// </summary>
        /// <param name="s"></param>
        public void setDescription(string s)
        {
            Txt_Descript.Text = s;
        }
    }
}
